<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第二题</title>
</head>

<body>
    <script>
        let user = {
            username: '小高',
            age: 21,
            gener: '女',
            aihao: 'jojo'
        }
        localStorage.setItem('users', JSON.stringify(user))
        const us = localStorage.getItem('users')
        js = JSON.parse(us)
        console.log(user)

        js.username = '小郭'

        delete js.gener
        console.log(js)

        localStorage.setItem('user1', JSON.stringify(js))
        const js1 = localStorage.getItem('user1')
        js2 = JSON.parse(js1)
        console.log(js2)
    </script>
</body>

</html>